// Determine the value type

const toString = Object.prototype.toString;

export const isArray = val => toString.call(val) === '[object Array]';

export const isString = val => typeof val === 'string';

export const isNumber = val => typeof val === 'number';

export const isUndefined = val => typeof val === 'undefined';

export const isObject = val => val !== null && typeof val === 'object';

export const isDate = val => toString.call(val) === '[object Date]';

export const isFunction = val => toString.call(val) === '[object Function]';

export const isBoolean = val => toString.call(val) === '[object Boolean]';
